<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>测试</title>

</head>
<style>
    .a {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    html, body {
        height: 100vh;
        width: 100vw;
        margin: 0;
    }

    body {
        display: block;
    }

</style>

<body>
<img src="https://z3.ax1x.com/2021/11/30/o1KwBq.jpg" class="a"/>
</body>
</html>